package com.sunxiansheng.consumer.listener;

import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * Description: Fanout交换机
 * @Author sun
 * @Create 2024/7/29 15:06
 * @Version 1.0
 */
@Component
public class FanoutConfigListener {

    @RabbitListener(queues = "fanout.queue1")
    public void receive1(String message) {
        System.out.println("fanout.queue1接收到的消息：" + message);
    }

    @RabbitListener(queues = "fanout.queue2")
    public void receive2(String message) {
        System.out.println("fanout.queue2接收到的消息：" + message);
    }

}